package com.allqj.sfx.ddd.member.application.assembler;

import com.allqj.sfx.application.dto.DictDTO;
import com.allqj.sfx.ddd.member.domain.entity.admin.Tenant;

/**
 * @author sjw
 * @className DictAssember
 * @date 2022/7/28 17:34
 * @description: 转换类
 */
public class DictAssember {
    public static DictAssember INSTANCE = new DictAssember();

    public DictDTO dto2Entity(Tenant tenant) {
        if (tenant == null) return null;
        DictDTO dictDTO = new DictDTO();
        dictDTO.setCode(tenant.getId());
        dictDTO.setName(tenant.getName());
        return dictDTO;
    }
}
